class CreateUserPhotos < ActiveRecord::Migration
  def self.up
    create_table :user_photos do |t|
      t.integer :user_id, :null => false
      t.string  :name,    :null => false,   :limit => 100
      t.text    :description
      t.string  :pic, :limit => 200
      t.integer :permissions,   :limit => 4,  :default => 0
      t.integer :status,  :limit => 1, :default => 0
      t.integer :flag,    :limit => 4
      t.timestamps
    end
  end

  def self.down
    drop_table  :user_photos
  end
end
